#!/bin/sh
ip=101.37.163.179
date=`date '+%Y%m%d'`
tar cvf huajinbao_${date}.tar  --exclude='*.jar' --exclude='logback.xml'  *
#tar cvf huajinbao_${date}.tar   --exclude='*.properties' --exclude='*.png' --exclude='*.jpg' --exclude='*.bmp' --exclude='*.jpeg'  --exclude='*base.js' --exclude='logback.xml' --exclude='*quartz.xml' *
#find . -type f -newer deploy_line |grep -v ".properties"|grep -v "applicationContext.xml"|grep -v "spring-application-quartz.xml"|grep -v "logback.xml"|grep -v ".tar"|xargs tar cvf seekop_${date}.tar
scp huajinbao_${date}.tar root@$ip:/home/application/huajinbao
ssh -l root $ip "cd /home/application/huajinbao;tar -xvf huajinbao_${date}.tar"
rm huajinbao_${date}.tar
#ssh -l root $ip "cd /home/tomcat/bin;sh  shutdown.sh;sh startup.sh"


